package test.scala

import main.scala.Parser
import main.scala.AST._

import org.scalatest.FunSuite

class TestAST extends FunSuite with Parser {
  
  test("var") {
    parseAll(start, "x" + "\n") match{
      case Success (e, in) => 
        assert(e == Var("x"));
      case f => fail("fail: " + f)
    }
  }
  
  test("addition") {
    val sum = 1 + 1
    assert(sum === 2)
  }
  
  ignore("subtraction") {
    val diff = 4 - 1
    assert(diff === 3)
  }
  
  test("something meaningful") (pending)

}